﻿@using DigDes.DSchool.SUPS.DataAccess.Interface
@model DigDes.DSchool.SUPS.DataAccess.Interface.ReportData

@{
    ViewBag.Title = "Отчет";
}
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" />
<h2>Отчет</h2>

<div style="padding-left: 20px;">
    @using (Html.BeginForm())
    {
        @Html.TextBoxFor(model => model.CarNumber);
        <input type="submit" value="Поиск" class="button" />
    }
</div>
<table class="reportTable" border="1">

    @{ List<ReportData> data = (List<ReportData>)ViewData["table"];}

    <tr>
        <th>
            @Html.LabelFor(model => model.CarNumber)
        </th>
        <th>
            @Html.LabelFor(model => model.UploadTime)
        </th>
        <th>
            @Html.LabelFor(model => model.DownloadTime)
        </th>
        <th>
            @Html.LabelFor(model => model.DepartureTime)
        </th>
        <th>
            @Html.LabelFor(model => model.ArriveTime)
        </th>
        <th></th>
    </tr>

    @foreach (DigDes.DSchool.SUPS.DataAccess.Interface.ReportData item in data)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.CarNumber)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.UploadTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DownloadTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DepartureTime)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ArriveTime)
            </td>
        </tr>
    }

</table>
